package com.wx.wxapp.exception;

import com.wx.wxapp.entity.Pet;

public class PetException extends RuntimeException {
    public static int NAME_EMPTY = 101;
    public static int AGE_EMPTY = 102;
    public static int SEX_EMPTY = 103;
    public static int VARIETY_EMPTY = 104;
    public static int INFORMATION_EMPTY = 105;
    public static int UNKOWN_ERROR = 106;


    public static final String NAME_EMPTY_MESSAGE = "姓名为空";
    public static final String AGE_EMPTY_MESSAGE = "年龄为空";
    public static final String SEX_EMPTY_MESSAGE = "年龄为空";
    public static final String VARIETY_EMPTY_MESSAGE = "年龄为空";
    public static final String INFORMATION_EMPTY_MESSAGE = "年龄为空";
    public static final String UNKOWN_ERROR_MESSAGE = "年龄为空";

    private Integer code;

    public PetException(String message){
        super(message);
        this.code = UNKOWN_ERROR;
    }
    public PetException(String message,Integer code){
        super(message);
        this.code = code;
    }

    public Integer getCode() {
        return code;
    }
    public void setCode(Integer code){
        this.code = code;
    }
}
